-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove usage of deprecated instrumentation.Library in favor of Scope #3104
Conversation
Signed-off-by: Bogdan Drutu <[email protected]>
3eba4aa
to
72853b8
Compare
|
Codecov Report
@@ Coverage Diff @@
## main #3104 +/- ##
=======================================
- Coverage 76.2% 76.2% -0.1%
=======================================
Files 179 179
Lines 11942 11942
=======================================
- Hits 9110 9106 -4
- Misses 2592 2596 +4
Partials 240 240
|
Yeah, I don't think this would be backwards-compatible, so we will probably have to exclude uses in stable modules. I'm in favor of it elsewhere, though. |
How come is not? Type alias does NOT create a new type, so the 2 "types" are equal, hence the generated code is backwards compatible. To prove my point, see golang/go@2580d0e |
We have previously decided not to make this change. I don't see anything that changes that decision. |
@Aneurysm9 short answer is yes, the hypothesis on which the decision was made, is invalid, see #2977 (comment) which I am trying to prove that is not true, so the decision is wrong. |
@MadVikingGod pointed out that we used an alias rather than a typedef and I have bad memory. That said, we have a goal of ensuring that dependency hell will never prevent a user from updating their instrumentation or SDK, I'd prefer to take the safer route and not change these uses in stable packages. |
Unless I am missing something obvious, this will break only if only users are forcing an older SDK. But that is a problem that you have even if for example you add a new func in API, that SDK uses, you should never use that. |
I think we may need a bit more deliberate approach to this than what has been offered here. The metrics are fine, that is not under the 1.x stability, but I think the tracing story is different. The two changes I would focus on are:
|
I am confused as to why type aliases do not solve the problem. The same play link with an alias compiles and works as intended, right? https://go.dev/play/p/TQukM9rrXQd @Aneurysm9 |
Thanks for explaining @jmacd. I agree that adding brief comments for when the function name and returned type differ would help clarify. But i'm still in favor of making the changes. |
…eprecation issues (#5627) Rather than the deprecated InstrumentationLibrary This is a replacement for #3104, as after this, there is no usage of `instrumentation.Library` within the SDK anymore. --------- Co-authored-by: Robert Pająk <[email protected]> Co-authored-by: Sam Xie <[email protected]>
With #5627 merged, this PR can be closed. Please let me know if you feel I forgot something in there. |
Signed-off-by: Bogdan Drutu [email protected]